home *** CD-ROM | disk | FTP | other *** search
/ Aminet 52 / Aminet 52 (2002)(GTI - Schatztruhe)[!][Dec 2002].iso / Aminet / util / moni / Scout-src.lha / netinclude / libraries / serscript.h < prev    next >
C/C++ Source or Header  |  2002-09-16  |  2KB  |  90 lines

  1. #ifndef LIBRARIES_SERSCRIPT_H
  2. #define LIBRARIES_SERSCRIPT_H \
  3.        "$Id: serscript.h,v 1.1.1.1 2001/11/26 22:21:17 tboeckel Exp $"
  4. /*
  5.  *    Definitions of AmiTCP/IP serscript.library
  6.  *
  7.  *      Copyright © 1995 AmiTCP/IP Group,
  8.  *                       Network Solutions Development, Inc.
  9.  *                       All rights reserved.
  10.  */
  11.  
  12. #ifndef EXEC_TYPES_H
  13. #include <exec/types.h>
  14. #endif
  15.  
  16. #ifndef DEVICES_SERIAL_H
  17. #include <devices/serial.h>
  18. #endif
  19.  
  20. #ifndef SYS_CDEFS_H
  21. #include <sys/cdefs.h>
  22. #endif
  23.  
  24. #define SERSCRIPTNAME "AmiTCP:libs/serscript.library"
  25.  
  26. #if 0
  27. /*
  28.  * SerScriptContext type
  29.  */
  30. typedef void * SERSCRIPTCONTEXT;
  31. #endif
  32.  
  33. /*
  34.  * serscript.library callback prototype.
  35.  * 
  36.  * context  - copy of the value given to Dialing function, you can use this to
  37.  *            track thing down on your code.
  38.  * action   - what to do:
  39.  *            SSCB_GET  - get the value of the variable name into result
  40.  *            SSCB_SET  - set the value of the variable name to value
  41.  *            SSCB_CALL - call an internal function name with arguments
  42.  *                        value, return result in result
  43.  *
  44.  * name     - name of the object in question
  45.  * value    - value (args) CSource buffer (valid from CurChr to Length)
  46.  * result   - buffer for result of both SET and CALL.
  47.  * 
  48.  */
  49. typedef ULONG (* ASM SerScriptCallback_t)(REG(a0) void * context,
  50.                       REG(d0) ULONG action,
  51.                       REG(a1) const UBYTE * name,
  52.                       REG(a2) struct CSource * value,
  53.                       REG(a3) struct CSource * result);
  54.  
  55. /* The action codes */
  56. #define SSCB_EXIT 0 /* internal only */
  57. #define SSCB_GET  1
  58. #define SSCB_SET  2
  59. #define SSCB_CALL 3
  60.  
  61. /*
  62.  * Return codes for both the SerScriptRun and SerScriptCallback
  63.  *
  64.  * These values can be converted to english language strings with the 
  65.  * SerScriptStrError() function.
  66.  */
  67. #define SS_OK         0
  68. #define SS_BREAK     1
  69. #define SS_TIMEOUT     2
  70. #define SS_NOCARRIER     3
  71. #define SS_NOMATCH     4
  72. #define SS_EOF         5
  73. #define SS_SYNTAX     6
  74. #define SS_UNKNOWN     7
  75. #define SS_BADARGS     8
  76. #define SS_TOOMANY     9
  77. #define SS_SCRIPTFAIL    10
  78. #define SS_MEMORY    11
  79. #define SS_VARIABLE    12
  80. #define SS_IOERROR    13
  81. #define SS_AREXX    14
  82. #define SS_ILLACTION    15
  83. #define SS_NOSCRIPT    16
  84. #define SS_NOUSERGROUP    17
  85. #define SS_INCOMPLETE    18
  86. #define SS_INTERNAL    19
  87. #define SS_FAIL        20
  88.  
  89. #endif /* LIBRARIES_SERSCRIPT_H */
  90.